﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TomShane.Neoforce.Controls;
using Microsoft.Xna.Framework;
namespace NOWAOnline.Scenes.LoginScene
{
        sealed class LoginForm : Window
        {
            public Button Okbtn;
            public Button Cancelbtn;
            public TextBox LoginBox;
            public TextBox PassBox;
            public Label LoginLable;
            public Label PassLable;
            public LoginForm(Manager manager)
                : base(manager)
            {
                Okbtn = new Button(manager);
                this.Okbtn.Text = "Ok";
                Okbtn.Init();
                Okbtn.Left = 71;
                Okbtn.Top = 64;
                Okbtn.Width = 128;
                Okbtn.Height = 30;
                Okbtn.Parent = this;

                Cancelbtn = new Button(manager);
                this.Cancelbtn.Text = "Cancel";
                Cancelbtn.Init();
                Cancelbtn.Left = 205;
                Cancelbtn.Top = 64;
                Cancelbtn.Width = 128;
                Cancelbtn.Height = 30;
                Cancelbtn.Parent = this;

                LoginBox = new TextBox(manager);
                //this.LoginBox.MaxLength = 14;
                this.LoginBox.Text = "Login";
                LoginBox.Init();
                LoginBox.Left = 71;
                LoginBox.Top = 12;
                LoginBox.Width = 325;
                LoginBox.Height = 20;
                LoginBox.Parent = this;

                PassBox = new TextBox(manager);
                //this.PassBox.MaxLength = 20;
                this.PassBox.Mode = TextBoxMode.Password;
                this.PassBox.PasswordChar = char.Parse("*");
                this.PassBox.Text = "password";
                PassBox.Init();
                PassBox.Left = 71;
                PassBox.Top = 38;
                PassBox.Width = 325;
                PassBox.Height = 20;
                PassBox.Parent = this;

                LoginLable = new Label(manager);
                this.LoginLable.Text = "Login:";
                LoginLable.Init();
                LoginLable.Left = 13;
                LoginLable.Top = 12;
                LoginLable.Width = 36;
                LoginLable.Height = 13;
                LoginLable.Parent = this;

                PassLable = new Label(manager);
                this.PassLable.Text = "Password:";

                PassLable.Init();
                PassLable.Left = 13;
                PassLable.Top = 38;
                PassLable.Width = 56;
                PassLable.Height = 13;
                PassLable.Parent = this;

                this.Width = 430;
                this.Height = 135;
                this.Text = "Login (try admin admin)";
                this.Resizable = false;
                this.CloseButtonVisible = false;
                this.Movable=false;
                this.Left = manager.Graphics.PreferredBackBufferWidth/2-215;
                this.Top = manager.Graphics.PreferredBackBufferHeight/2-67;
            }
        }
    }


